<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 
        es6 --- 别名是什么 es6.0 es2015
     -->

    <script>
        // 知识点1:let
        // 变量声明

        var a = 10

        if (a===10) {
            var count1 = 666
            let count2 = 777

            if (a === 10) {
                let count22 = '777-1'
            }

            // console.log(count22) // 报错
        }

        // es6---块级作用域
        // 一个大括号算一级作用域

        console.log(count1)
        // console.log(count2) // 报错 块级作用域
    </script>
</body>
</html>